package pers.vic.practice.module.statistics.service;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Service;
import pers.vic.practice.module.statistics.mapper.StatisticsMapper;
import pers.vic.practice.module.statistics.model.ClassesNumModel;
import pers.vic.practice.module.statistics.model.ScoreModel;
import pers.vic.practice.module.statistics.model.SurveyModel;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述:
 * @author Vic.xu
 * @date 2022-04-21 10:09
 */
@Service
public class StatisticsService {

    @Resource
    private StatisticsMapper statisticsMapper;

    /**
     * 概况统计
     */
    public SurveyModel survey() {
        return statisticsMapper.survey();
    }

    /**
     * 班级人数统计
     * @return className and number
     */
    public List<ClassesNumModel> classesNum(){
        return statisticsMapper.classesNum();
    }

    /**
     * 成绩统计
     * @return 班级的平均分 最高最低分
     */
    public List<ScoreModel> scoreList(ScoreModel scoreModel){
        return statisticsMapper.scoreList(scoreModel);
    }

}
